package com.huadao.cart_ccs.experiment.internalControl;

import android.view.View;

import com.huadao.cart_ccs.R;
import com.huadao.cart_ccs.base.BaseDialogFragment;
import com.huadao.cart_ccs.base.BasePresenter;
import com.huadao.cart_ccs.common.glide.GlideImageLoader;
import com.youth.banner.Banner;

import java.util.ArrayList;
import java.util.List;

public class InternalControlDF extends BaseDialogFragment implements IInternalControlContract.IInternalControlView {

    @Override
    protected BasePresenter getPresenter() {
        return new InternalControlPresenter(this);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.dialogfrag_internal_control;
    }

    @Override
    protected void onInit() {
        setSetIconsVisibility(View.GONE);
        setTitle(getString(R.string.internalControlData));

        List<String> images=new ArrayList<>();
        images.add("https://www.zcool.com.cn/work/ZMTY1MzQ4OTI=.html");
        images.add("https://www.zcool.com.cn/work/ZMTY1MzQ4OTI=.html");
        Banner banner = view.findViewById(R.id.banner);
        //设置图片加载器
        banner.setImageLoader(new GlideImageLoader());
//        banner.setBannerStyle(BannerConfig.CIRCLE_INDICATOR_TITLE);
        //设置图片集合
        banner.setImages(images);
        banner.isAutoPlay(false);
        //banner设置方法全部调用完毕时最后调用
        banner.start();
    }
}
